package com.example.jpetstoreclient.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.jpetstoreclient.common.CommonResponse;
import com.example.jpetstoreclient.domain.Order;

import java.util.List;
import java.util.Objects;

public interface OrderService extends IService<Order> {

    //获取用户所有订单
    CommonResponse<List<Order>> getAllOrders(int user_id);

    //生成订单
    CommonResponse<List<Order>> generateOrders(List<Integer> cart_ids,int user_id,String remark,String address);

    //立即购买生成订单
    CommonResponse<Object> addOrder(Order order);

    //改变订单付款状态
    CommonResponse<Order> payOrder(int order_id);

    CommonResponse<Object> deleteOrder(int order_id);

}
